<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>游记明细</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css">
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/travelContent.css"/>
    <link rel="stylesheet" href="/dist/css/rolldate.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script src="/js/common.js"></script>
    <script src="/dist/rolldate.js"></script>


    <script>
        $(function () {
            //获取id------------------------------------------------
            //引入文件common.js中的方法,表示获得当前路径的?号之后的数据,自动包装成数组
            var params = getParams();
            var id = params.id;
            var href = $("#pay").attr("href","/pay.html?id="+id);
            console.log(href);



            if (id){
                //获取指定id的游记
                $.get("/hotels/"+id,function (data) {
                    $("#hotelPlace").html(data)
                })
                $.get("/rooms/"+ id, function (data) {
                    console.log(data);
                    //回显
                    $("#hotelImg").attr("src",data.list[0].hotel.coverUrl)
                    $("#hotelTitle").html(data.list[0].hotel.title)
                    $("#hotelsubTitle").html(data.list[0].hotel.subTitle)
                    $("#hotelIntroduce").html(data.list[0].hotel.introduce)
                    $("#allTravels").renderValues(data,{
                    });
                })
            }
            //end------------------------------------------------


            //-----------------------------时间插件---------------------------------------------------
            new rolldate.Date({//设置model
                el:'#date14',
                format:'YYYY-MM-DD',
                beginYear:2000,
                endYear:2100,
                theme:'blue',
                confirmBefore:function(el,date){
                    //vue.date = date;
                }
            })
            new rolldate.Date({//设置model
                el:'#date15',
                format:'YYYY-MM-DD',
                beginYear:2000,
                endYear:2100,
                theme:'blue',
                confirmBefore:function(el,date){
                    //vue.date = date;
                }
            })
            //-----------------------------end---------------------------------------------------


            //-----------------------------提交表单---------------------------------------------------


            //-----------------------------end---------------------------------------------------

        })
    </script>
</head>
<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="javascript:history.go(-1);">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>
        </div>
        <div class="col">
        </div>
    </div>
</div>

<div class="travels">
    <img  class="cover" render-src="data.list.hotel.titel"  id="hotelImg">
    <div class="container">
        <h6 class="title"   id="hotelTitle"></h6>
        <h6 class="title" style="font-size:13px;color:rosybrown;"   id="hotelsubTitle"></h6>
        <h6 class="title" style="font-size:14px;color:black;"  id="hotelIntroduce"></h6>
        <div class="row">
            <div class="col-9">地址:  上海市
                <h6 class="title" style="font-size:14px;color:black;"  id="hotelPlace"></h6>
            </div>
            <div class="col-3">
                <a href="map.html"><i class="fa fa-paper-plane-o fa-2x"></i></a>
            </div>
        </div>
        <!--<div>
            <div id="app">
                入住日期 :<input readonly type="text" class="form-control" id="date14" placeholder="请选择入住日期" v-model="date"><br>
                离店日期 :<input readonly type="text" class="form-control" id="date15" placeholder="请选择离店日期" v-model="date">
            </div>
        </div>-->
    </div>
    <div class="container">
        <h6>酒店房间</h6>
        <div id="allTravels">

            <div render-loop="list">
                <div class="row detail" >
                    <div class="col">
                        <a data-href="/hotelRoomContent.html?id=" render-fun="setHref" render-key="list.id">
                            <h4 render-html="list.title"></h4>
                            <font size="1" color="#708090"> <h6  render-html="list.subTitle"></h6></font>
                        </a>
                        <p>
                            <a>
                                <span render-html="list.bedDisplay"></span> </a>
                            <font size="1" color="#dc143c"><span class="addr" id="rmb" render-html="list.price"></span>RMB 起</font>
                            </br>
                            <font size="2" color="#6495ed">
                                <input type="hidden" id="id" data-html="id">
                                <a href="javascript:;" class="input">预定房间</a>
                            </font>
                        </p>
                        <p>
                            <i class="fa fa-wifi"></i>&nbsp;<i class="fa fa-car"></i>&nbsp;<i class="fa fa-cart-plus"></i>&nbsp;<i class="fa fa-birthday-cake"></i>
                            &nbsp;<i class="fa fa-cutlery"></i>
                        </p>
                    </div>
                    <div class="col bigimg">
                        <a data-href="/hotelRoomContent.html?id=" render-fun="setHref" render-key="list.id" >

                            <img render-src="list.coverUrl">
                        </a>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <hr>
    <div class="container d-flex">
        <div class="p-2  flex-fill">
            <a -href="/pay.html"   id="pay"><span type="button" class="btn btn-success" >预定房间</span></a>&nbsp;
            服务电话:021-88888888
        </div>
    </div>
</div>


</body>

</html>